Skip to content

Fixes in ed25519 tests, add prints in timeout tests#360

Merged
bigbrett merged 1 commit into
wolfSSL:mainfrom
padelsbach:test-fixes-ed25519
May 11, 2026
Merged

Fixes in ed25519 tests, add prints in timeout tests#360
bigbrett merged 1 commit into
wolfSSL:mainfrom
padelsbach:test-fixes-ed25519

Conversation

@padelsbach
Copy link
Copy Markdown
Contributor

@padelsbach padelsbach commented May 11, 2026

  • 4 fixes in wh_test_crypto.c in ed25519 logic
  • Add missing WH_TEST_PRINT("SUCCESS") in wh_test_timeout.c

Specifically, wolfssl commit wolfSSL/wolfssl#10302 requires ecc sign hash to be non-zeroed.

@padelsbach padelsbach force-pushed the test-fixes-ed25519 branch from 290ed57 to 96f8b74 Compare May 11, 2026 16:00
@bigbrett bigbrett marked this pull request as ready for review May 11, 2026 16:05
Copilot AI review requested due to automatic review settings May 11, 2026 16:05
@bigbrett bigbrett merged commit 80ee2d5 into wolfSSL:main May 11, 2026
107 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the wolfHSM test suite to accommodate recent wolfSSL behavior changes around ECC signing inputs, and to make timeout test execution more visibly traceable via success prints.

Changes:

  • Ensure ECC signing tests use a non-zero digest (avoids wolfCrypt rejecting all-zero hashes unless WC_ALLOW_ECC_ZERO_HASH is defined).
  • Improve Ed25519 negative-path assertions to accept both “verified==0” and SIG_VERIFY_E outcomes for tampered signatures.
  • Add missing/consistent WH_TEST_PRINT(...SUCCESS...) messages in timeout tests (including the POSIX wrapper).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/wh_test_timeout.c Adds explicit success prints to individual timeout tests and ensures the POSIX entrypoint prints success after all subtests pass.
test/wh_test_crypto.c Fixes ECC digest setup for signing, improves Ed25519 import keyId handoff for cleanup on partial failure, and hardens tampered-signature verification expectations.
test-refactor/client-server/wh_test_crypto.c Updates ECC256 sign/verify test to use a non-zero digest to match current wolfCrypt behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants